package com.gtq.uhome.service.serviceImpl;

import com.gtq.uhome.mapper.OperationTimeMapper;
import com.gtq.uhome.pojo.OperationTime;
import com.gtq.uhome.service.OperatorLogService;
import com.gtq.uhome.vo.OperatorLog;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.sql.Timestamp;
import java.util.List;

/**
 * 操作日志
 */
@Service("operatorLogService")
@Transactional(propagation = Propagation. REQUIRED, isolation = Isolation.READ_COMMITTED, rollbackFor = Throwable.class)
public class OperatorLogServiceImpl implements OperatorLogService {

    @Resource
    OperationTimeMapper operationTimeMapper;//实例化

    /**
     * 查询所有后台管理员的操作记录
     * @return
     */
    @Override
    public List<OperatorLog> selectOperatorLogAll() {

        return operationTimeMapper.selectAll();

    }

    /**
     * 根据条件查询所有后台管理员的操作记录
     * @param operatorLog
     * @return
     */
    @Override
    public List<OperatorLog> selectOperatorLogLike(OperatorLog operatorLog) {
        return operationTimeMapper.selectLike(operatorLog);
    }
}
